﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AbstractFactory.ProductSet2
{
    public class FactoryBase:IAbstractFactory
    {
        protected IDictionary<Type, Type> maper;
        public FactoryBase(IDictionary<Type, Type> maper)
        {
            this.maper = maper;
        }
        public virtual T Create<T>() where T : class
        {
            if (maper.Count==0||maper==null||!(maper.ContainsKey(typeof(T))))
            {
                throw new ArgumentNullException("T");
            }
        }
    }
}
